home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1998 August / PC Direct August 1998.iso / S / powerj / Product / hpp.z / DTOBASE.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  24.7 KB  |  727 lines

  1. #ifndef _DTOBASE_HPP
  2. #define _DTOBASE_HPP
  3.  
  4. /*************************************************************************
  5.  *
  6.  * DTObject -- Base Design-Time object
  7.  *
  8.  *  DTObject is an abstract base class. Do not add any data members or
  9.  *  non-pure-virtual member functions.
  10.  *
  11.  *  NOTE: if you add methods to DTObject, keep DTUObject synchronized!
  12.  *
  13.  *************************************************************************/
  14.  
  15. #include "mtdef.hpp"
  16.  
  17. class  MetaObject;
  18. class  FormEdit;
  19. class  DTFormEditBase;
  20. class  WStringList;
  21. class  MMStyle;
  22. class  MMProperty;
  23. class  MMEvent;
  24. class  MTPropertyDialog;
  25. class  OleEventDialog;
  26. class  MTIPropertyList;
  27. class  MTIEventList;
  28. class  DTUserFunctionVect;
  29. class  DTCodeBlockList;
  30. class  DTCodeBlockListList;
  31. class  DTIInterface;
  32. class  SaveSource;
  33. class  SaveBlock;
  34. class  DTCodeBlockBase;
  35. class  ostream;
  36. struct DTObjectImp;
  37.  
  38.  
  39. #undef GetForm
  40. #if defined( _UNICODE )
  41.     #define GetForm GetFormW
  42.     #define SetForm SetFormW
  43. #else
  44.     #define GetForm GetFormA
  45.     #define SetForm SetFormA
  46. #endif
  47.  
  48. #define VEXPORT virtual         // don't override these
  49.  
  50. typedef WInt  DT_TextifyV;
  51. typedef WLong MMFileFragment;
  52. typedef WLong MMCodeGeneration;
  53. struct  MMFileGenerationParms;
  54. struct  MMCodeGenerationParms;
  55. class   MMFDXPropertyVect;
  56.  
  57. class METAEXPORTCLASSDEF DTObject : public WObject
  58. {
  59.     public:
  60.         virtual WBool           operator== ( const DTObject & ) const = 0;
  61.  
  62.     public:
  63.  
  64.         /*************************************************************
  65.          * Position
  66.          *************************************************************/
  67.  
  68.         //
  69.         // Rectangle
  70.         //
  71.         //    The pixel-based position of the object; optionally, absolute
  72.         //    to the desktop.  
  73.  
  74.         virtual void            DTGetRectangle( WRect & r,
  75.                                                 WBool abs = FALSE ) const = 0;
  76.         virtual void            DTSetRectangle( const WRect & r,
  77.                                                 WBool abs = FALSE ) = 0;
  78.  
  79.         //
  80.         // ClientRectangle
  81.         //
  82.         //    Get the client rectangle.  This is mainly used for DTForms.
  83.  
  84.         virtual void            DTGetClientRectangle( WRect & r ) const = 0;
  85.  
  86.         //
  87.         // RCRectangle
  88.         //
  89.         //    The rectangle to use in the .rc file (still in pixel though).
  90.         //    This differs for WComboBox, which gives a .rc file rectangle
  91.         //    of the correct height instead of the design time height.
  92.  
  93.         virtual void            DTGetRCRectangle( WRect & r ) const = 0;
  94.  
  95.         //
  96.         // PixelsToDLU / DLUToPixels
  97.         //
  98.         //    Map between pixels and dialog units (DLU).
  99.  
  100.         virtual WRect           DTMapPixelsToDLU( const WRect & pix ) const = 0;
  101.         virtual WRect           DTMapDLUToPixels( const WRect & dlu ) const = 0;
  102.  
  103.         //
  104.         // BringToTop
  105.         //
  106.         //    Bring the object to the top of the Z- order
  107.  
  108.         virtual void            DTBringToTop() = 0;
  109.  
  110.         //
  111.         // Repaint
  112.         //
  113.         //    Invalidate an object and cause it to be repainted
  114.  
  115.         virtual void            DTRepaint( WRect * rect=NULL ) = 0;
  116.  
  117.         //
  118.         // GenFileFragment
  119.         //
  120.         //    Generate a file-level fragment of code.
  121.  
  122.         virtual void GenFileFragment( MMFileFragment fg, WStringList &,
  123.                                         MMFileGenerationParms * parms ) const = 0;
  124.  
  125.         //
  126.         // GenerateCode [new]
  127.         //
  128.         //    Generate a fragment of code for a component.
  129.         //    The "cg" parameter indicates which scrap of code to generate.
  130.  
  131.         virtual void GenerateCode( MMCodeGeneration, ostream &, MMCodeGenerationParms & ) = 0;
  132.  
  133.         //
  134.         // RequiredIncludes
  135.         //
  136.         //    Fill in a list of required include files.
  137.  
  138.         virtual void GetRequiredIncludes( WStringList & includes ) const = 0;
  139.  
  140.         //
  141.         // RequiredBaseClasses
  142.         //
  143.         //    Fill in a list of required base classes to add to the form
  144.  
  145.         virtual void GetRequiredBaseClasses( WStringList & bases ) const = 0;
  146.  
  147.         /*************************************************************
  148.          * Common Behaviour
  149.          *************************************************************/
  150.  
  151.         //
  152.         // Meta
  153.         //
  154.         //    The Meta- object instance that is associated
  155.         //    with this DT- object
  156.  
  157.         VEXPORT const MetaObject *  GetMeta() const = 0;
  158.         VEXPORT void                SetMeta( const MetaObject * ) = 0;
  159.  
  160.         //
  161.         // Reference Card Meta
  162.         //    The Meta-object that is used to provide reference
  163.         //    card information.  The default implentation returns GetMeta()
  164.  
  165.         VEXPORT const MetaObject *  GetRefCardMeta() const = 0;
  166.  
  167.         //
  168.         // Name
  169.         //
  170.         //    The variable used in the user's code to represent this
  171.         //    object (eg. cb_1).  Although there is a default implementation,
  172.         //    you may wish to override this to perform an action when the
  173.         //    name changes (eg. change names of all child objects).
  174.  
  175.         virtual void            DTSetName( const WString & name ) = 0;
  176.         virtual WString         DTGetName() const = 0;
  177.  
  178.         //
  179.         // ClassName
  180.         //
  181.         //    This returns the class name of the form containing the object.
  182.         //    If the object has a class (i.e. it is a form), then it returns
  183.         //    the form name, not the containing name.
  184.  
  185.         virtual WString         DTGetClassName() const = 0;
  186.  
  187.         //
  188.         // ClassDefinition
  189.         //
  190.         //    The class name used to implement a component in code.
  191.         //    This lets the user specify a different class than the
  192.         //    default.
  193.  
  194.         virtual void            SetClassDefinition( const WString & ) = 0;
  195.         virtual WString         GetClassDefinition() const = 0;
  196.  
  197.         //
  198.         // ClassIncludes
  199.         //
  200.         //    Extra header files this compnonent requires (specified
  201.         //    by the user.  For use with ClassDefinition.
  202.  
  203.         virtual void            SetClassIncludes( const WString & ) = 0;
  204.         virtual WString         GetClassIncludes() const = 0;
  205.  
  206.         //
  207.         // WImplementation
  208.         //
  209.         //    Each DT- object must have an associated WObject that
  210.         //    represents it on the design-time form.  This is not
  211.         //    required to be a WWindow-derived class, but that is the
  212.         //    case that has been tested most -- only WOleObjects are
  213.         //    an exception.
  214.  
  215.         VEXPORT WObject *       GetWImplementation() const = 0;
  216.         VEXPORT void            SetWImplementation( WObject * wobj,
  217.                                                     WBool deleteOld=TRUE ) = 0;
  218.  
  219.         //
  220.         // ConcreteInstance
  221.         //
  222.         //    Return the concrete instance (the aggregated object)
  223.  
  224.         virtual const DTObject *GetConcreteImplementation() const = 0;
  225.         virtual DTObject *      GetConcreteImplementation() = 0;
  226.  
  227.         //
  228.         // Window
  229.         //
  230.         //    If there is a WWindow implementing the design-time
  231.         //    behaviour of the object, get and return it.  Otherwise,
  232.         //    NULL (as for WOleObject).
  233.  
  234.         VEXPORT WWindow *       GetWindow() const = 0;
  235.  
  236.  
  237.         //
  238.         // DTGetParent
  239.         //
  240.         //    The parent window if there is a window.
  241.  
  242.         VEXPORT WWindow *       DTGetParent() const = 0;
  243.  
  244.         //
  245.         // ResourceID
  246.         //
  247.         //    The id of the control in the .res file
  248.  
  249.         VEXPORT void            SetResourceID( long id ) = 0;
  250.         VEXPORT long            GetResourceID() const = 0;
  251.  
  252.         //
  253.         // TabIndex
  254.         //
  255.         //    Tabbing order of control.  Controls are emitted into
  256.         //    the resource file in tab index order.
  257.  
  258.         VEXPORT void            SetTabIndex( long idx ) = 0;
  259.         VEXPORT long            GetTabIndex() const = 0;
  260.  
  261.  
  262.         //
  263.         // CodeBlockList
  264.         //
  265.         //    A list of events associated with the object.
  266.         //
  267.         //     RemoveEvent - remove a single event
  268.         //
  269.  
  270.         VEXPORT const DTCodeBlockList & GetCodeBlockList() const = 0;
  271.         VEXPORT DTCodeBlockList &       GetCodeBlockList() = 0;
  272.  
  273.         VEXPORT WInt                    GetAllCodeBlockLists( DTCodeBlockListList & ) = 0;
  274.  
  275.         //
  276.         // RemoveEvent
  277.         //
  278.         //    Remove a code block from the list and remove any
  279.         //    other pointers to it (ie. from object inspector).
  280.  
  281.         VEXPORT DTCodeBlockBase *       RemoveEvent( DTCodeBlockBase * ) = 0;
  282.  
  283.         //
  284.         // FindEvent
  285.         //
  286.         //    Find a code block that has already been added to
  287.         //    this object.
  288.  
  289.         VEXPORT DTCodeBlockBase *       FindEvent( const char * ) const = 0;
  290.  
  291.         //
  292.         // AllowEvent
  293.         //
  294.         //    Allow the given event to be included in the event inpector
  295.         //    for this object.
  296.  
  297.         VEXPORT WBool                   AllowEvent( const MMEvent * ) const = 0;
  298.  
  299.         //
  300.         // UserFunctionVect
  301.         //    A vector of user functions associated with the object.
  302.         //
  303.  
  304.         VEXPORT const DTUserFunctionVect &  GetUserFunctionVect() const = 0;
  305.         VEXPORT DTUserFunctionVect &        GetUserFunctionVect() = 0;
  306.         VEXPORT void                        AddUserFunction( DTCodeBlockBase * ) = 0;
  307.         VEXPORT void                        RemoveUserFunction( DTCodeBlockBase * ) = 0;
  308.         VEXPORT DTCodeBlockBase *           FindUserFunction( const char * ) = 0;
  309.  
  310.         //
  311.         // CMCodeBlock
  312.         //
  313.         //    Special class code blocks
  314.         //
  315.         VEXPORT DTCodeBlockBase *   GetCMCodeBlock( WULong b ) const = 0;
  316.         VEXPORT void                SetCMCodeBlock( WULong b, DTCodeBlockBase * ) = 0;
  317.  
  318.         //
  319.         // Form, DTForm
  320.         //
  321.         //    The FormEdit associated with this object; the first
  322.         //    form is only useful from within Optima code; the second,
  323.         //    mainly from CompDLL.  SetForm is called by Optima when
  324.         //    it instantiates the object.
  325.  
  326.         VEXPORT FormEdit *      GetForm() const = 0;
  327.         VEXPORT DTFormEditBase *GetDTForm() const = 0;
  328.         VEXPORT void            SetForm( DTFormEditBase * ) = 0;
  329.  
  330.         //
  331.         // Child
  332.         //
  333.         //    The DTObject Children for this DTObject.  DTObjects
  334.         //    may now own other DTObjects.
  335.  
  336.         VEXPORT int             GetChildCount() const = 0;
  337.         VEXPORT DTObject *      GetChild( int index ) const = 0;
  338.         VEXPORT WBool           AddChild( DTObject *, int after = -1 ) = 0;
  339.         VEXPORT WBool           RemoveChild( DTObject * ) = 0;
  340.         VEXPORT DTObject *      GetParent() const = 0;
  341.  
  342.         //
  343.         // Style
  344.         //
  345.         //    The Windows style property of the associated Window.
  346.         //    This doesn't necessarily match GetWindow()->GetStyle()
  347.         //    because some styles are deferred until run-time (such
  348.         //    as WSVisible).
  349.  
  350.         VEXPORT WStyle          GetStyle() const = 0;
  351.         VEXPORT WBool           SetStyle( WStyle stl, WBool clone=FALSE ) = 0;
  352.  
  353.         //
  354.         // DefaultStyle
  355.         //
  356.         //    The style with which new instances are created.  Default
  357.         //    implementation returns GetWindow()->GetDefaultStyle().
  358.  
  359.         virtual WStyle          GetDefaultStyle() const = 0;
  360.  
  361.         //
  362.         // ExtendedStyle
  363.         //
  364.         //    The ExtendedStyle property of the window nature.
  365.  
  366.         virtual WStyle          GetExtendedStyle() const = 0;
  367.         virtual WBool           SetExtendedStyle( WStyle style, WBool clone=FALSE ) = 0;
  368.  
  369.         //
  370.         // DefaultExtendedStyle
  371.         //
  372.         //    See DefaultStyle
  373.  
  374.         virtual WStyle          GetDefaultExtendedStyle() const = 0;
  375.  
  376.         //
  377.         // InternalStyle
  378.         //
  379.         //    The styles that are stored internally.
  380.  
  381.         virtual void            SetInternalStyle( WStyle s, WStyle ex ) = 0;
  382.  
  383.         //
  384.         // Visible
  385.         //
  386.         //    The object is currently visible.
  387.  
  388.         virtual WBool           GetVisible() = 0;
  389.         virtual WBool           SetVisible( WBool visible ) = 0;
  390.  
  391.  
  392.         //
  393.         // Create
  394.         //
  395.         //    Call Create on the windowed object.
  396.         //
  397.         virtual WBool           Create( WWindow * parent, const WRect & r,
  398.                                         const WChar * text, WStyle style,
  399.                                         WStyle exStyle, void * data = NULL,
  400.                                         WBool isLoading = FALSE ) = 0;
  401.  
  402.         //
  403.         // NonVisual
  404.         //
  405.         //    NonVisual objects are represented by a picture box at
  406.         //    design time -- eg. WTimer, WMessageBox, WFileDialog.
  407.  
  408.         VEXPORT WBool           GetNonVisual() const = 0;
  409.  
  410.         // DTInfo
  411.         //
  412.         //    Each object can have information that is not handled by
  413.         //    the general framework.  For instance, listboxes store their
  414.         //    lines separately.  HasDTInfo should return true if you want
  415.         //    to store object-specific information, then the SaveDTInfo
  416.         //    and LoadDTInfo functions will be called.
  417.  
  418.         virtual WBool           HasDTInfo() = 0;
  419.         virtual WBool           SaveDTInfo( SaveSource & ) = 0;
  420.         virtual WBool           LoadDTInfo( SaveBlock *, WBool beforeCreate ) = 0;
  421.  
  422.         //
  423.         // CreateEventPopupMenu
  424.         //
  425.         //    Popupulate a popup menu with the events that are deemed
  426.         //    useful ("hot" events) as well as events with code.  There
  427.         //    is a default behaviour which is overriden for Ole objects.
  428.  
  429.         virtual WBool           CreateEventPopupMenu( WPopupMenu * popup ) = 0;
  430.  
  431.         //
  432.         // IsResizeable
  433.         //
  434.         //    IsResizeable allows non-visual objects and Ole objects to
  435.         //    deny resizing (can change after created
  436.  
  437.         virtual WBool           GetIsResizeable() = 0;
  438.  
  439.         //
  440.         // IsMoveable
  441.         //
  442.         //    IsMoveable allows objects to deny being moved
  443.         //    for example if they are participating in a layout manager
  444.         //    or if they are a tab control page.
  445.  
  446.         virtual WBool           GetIsMoveable() = 0;
  447.  
  448.  
  449.         //
  450.         // Hollow
  451.         //
  452.         //    GroupBoxes are treated as "Hollow" controls in that when
  453.         //    they are moved, contained controls are also moved.  Also,
  454.         //    hollow controls are not active except for a border around
  455.         //    the outside.  HollowRect is the rectangle in the center
  456.         //    that doesn't activate the object.
  457.  
  458.         virtual WBool           GetIsHollow() = 0;      // groupbox
  459.         virtual WRect           GetHollowRect() = 0;    // interior of groupbox
  460.  
  461.         //
  462.         // DTPopupMenu
  463.         //    The popup menu associated with a WWindow.  NOT the
  464.         //    popup menu that shows up at design-time.
  465.         //    [ITB:06/4] expect this will move to DTW.
  466.  
  467.         VEXPORT WBool           SetDTPopupMenu( DTObject * ) = 0;
  468.         VEXPORT DTObject *      GetDTPopupMenu() const = 0;
  469.  
  470.         //
  471.         // AmendPopup 
  472.         //
  473.         //    Override this function to modify the design-time context
  474.         //    popup.  "before" is true before the popup is displayed,
  475.         //    false afterwards.  Make sure you clean up any menu items
  476.         //    you add or they will remain for other objects as well.
  477.         //
  478.         virtual void            AmendPopup( WPopupMenu *, WBool before ) = 0;
  479.  
  480.         //
  481.         // IsValidChild
  482.         //
  483.         //    Returns true if obj is allowed as a child of this
  484.         //    DTObject.  errMsg is filled in with details about
  485.         //    why it isn't allowed.
  486.         virtual WBool           IsValidChild(
  487.                                         const MetaObject *obj,
  488.                                         WString &errMsg ) const = 0;
  489.  
  490.         //
  491.         // IsValidContainer
  492.         //
  493.         //    Returns true if obj is allowed as a container for this
  494.         //    DTObject.  errMsg is filled in with details about
  495.         //    about why it isn't allowed.
  496.         virtual WBool           IsValidContainer(
  497.                                         const DTObject *obj,
  498.                                         WString &errMsg ) const = 0;
  499.  
  500.         //
  501.         // SetEventHandler
  502.         //
  503.         //    Set an event handler on the W-Implementation object.
  504.  
  505.         virtual WBool           DTSetEventHandler( WEventID id,
  506.                                                  WObject * object,
  507.                                                  WEventHandler handler,
  508.                                                  void *userdata=NULL ) = 0;
  509.  
  510.         //
  511.         // RemoveEventHandler
  512.         //
  513.         //    Remove an event handler on the W-Implementation object.
  514.  
  515.         virtual WBool           DTRemoveEventHandler( WEventID id,
  516.                                                  WObject * object,
  517.                                                  WEventHandler handler ) = 0;
  518.  
  519.         //
  520.         // CallEventHandler
  521.         //
  522.         //    Call an event handler on the W-Implementation object.
  523.  
  524.         virtual WBool           DTCallEventHandler( WEventID id,
  525.                                             WObject * object,
  526.                                             WEventData * eventData=NULL,
  527.                                             WLong * retval=NULL,
  528.                                             WInt indexToStartAt=0 ) const = 0;
  529.  
  530.         //
  531.         // DTIInterface
  532.         //
  533.         //    Get DTInterface with a particular name. This virtual
  534.         //    function is overridden once by derived classes that use
  535.         //    DTInterfaces
  536.  
  537.         virtual DTIInterface *  GetDTIInterface( const WChar * ifname ) = 0;
  538.  
  539.         //
  540.         // Protected
  541.         //
  542.         //    This property controls the behaviour of a design time
  543.         //    object.  Protected objects are:
  544.         //              -  not saved or loaded
  545.         //              -  cannot be deleted directly by the user
  546.  
  547.         virtual WBool GetProtected() const = 0;
  548.  
  549.  
  550.         /*************************************************************
  551.          * Property Editting
  552.          *************************************************************/
  553.  
  554.         //
  555.         // EditProperties
  556.         //
  557.         //    Display a property sheet window.  Depending on "child",
  558.         //    the property sheet may be a child (as in object view) or
  559.         //    a popup dialog (normal property sheets).
  560.  
  561.         virtual WBool                   EditProperties( WWindow *,
  562.                                                         WBool child = FALSE ) = 0;
  563.         //
  564.         // ClearPropertyEditor
  565.         //
  566.         //    Remove and destroy any open property editor for this object.
  567.  
  568.         virtual void                    ClearPropertyEditor( WBool deleteNow = FALSE ) = 0;
  569.  
  570.         //
  571.         // UpdatePropertyRect
  572.         //
  573.         //    Inform any open property editors to update the position
  574.         //    property since this object has been moved
  575.  
  576.         virtual WBool                   UpdatePropertyRect() = 0;
  577.  
  578.         //
  579.         // PropDialog
  580.         //
  581.         //    Get a pointer to the open property editor or return NULL.
  582.  
  583.         virtual MTPropertyDialog *      GetPropDialog() = 0;
  584.  
  585.         //
  586.         // HasProperty
  587.         //
  588.         //    Return TRUE if this object has a property named "name".
  589.  
  590.         VEXPORT WBool                   HasProperty( const WString & name ) const = 0;
  591.  
  592.         //
  593.         // Property
  594.         //
  595.         //    Get or set a property with various formats.  
  596.         //    The additional formats are provided for convenience only.
  597.  
  598.         VEXPORT WString                 GetProperty( const WString & name, DT_TextifyV t = 1 ) const = 0;
  599.         VEXPORT WBool                   GetPropertyBool( const WString & name ) const = 0;
  600.         VEXPORT WLong                   GetPropertyEnum( const WString & name ) const = 0;
  601.         VEXPORT WRect                   GetPropertyRect( const WString & name ) const = 0;
  602.         VEXPORT WLong                   GetPropertyLong( const WString & name ) const = 0;
  603.         VEXPORT WBool                   SetProperty( const WString & name, const WString & val, DT_TextifyV t = 1 ) = 0;
  604.         VEXPORT WBool                   SetPropertyBool( const WString & name, WBool val ) = 0;
  605.         VEXPORT void                    SetPropertyEnum( const WString & name, WLong val ) = 0;
  606.         VEXPORT void                    SetPropertyRect( const WString & name, const WRect & r ) = 0;
  607.         VEXPORT void                    SetPropertyLong( const WString & name, WLong r ) = 0;
  608.  
  609.         //
  610.         // MappedValue
  611.         //
  612.         //    Deferred properties are stored internally as mapped values.
  613.         //    You can access these mapped values directly by index.
  614.         //    [ITB:REMOVE]
  615.  
  616.         VEXPORT WString                 GetMappedValue( WUInt i ) const = 0;
  617.         VEXPORT void                    SetMappedValue( WUInt i, const WString & s ) = 0;
  618.  
  619.         //
  620.         // PropertyChanged
  621.         //
  622.         //    This function is called after any property has changed
  623.         //    values.  You can override this function to perform
  624.         //    required actions when a property changes.
  625.         //    "name" is the name of the changed property
  626.  
  627.         virtual void                    PropertyChanged( const WString & name ) = 0;
  628.  
  629.         //
  630.         // AllowUpdates
  631.         //
  632.         //    Determine whether the DTObject should respond to
  633.         //    property changes or not.  Turn this off during load;
  634.         //    if doPropertyChanged is TRUE
  635.         //    when it is re-enabled, an empty PropertyChanged is sent.
  636.  
  637.         virtual void                    SetAllowUpdates( WBool allow, WBool doPropertyChanged = TRUE ) = 0;
  638.         virtual WBool                   GetAllowUpdates() const = 0;
  639.  
  640.         //
  641.         // DetachEditor
  642.         //
  643.         //    Virtual call to detach an editor if necessary.
  644.  
  645.         virtual void                    DetachEditor() = 0;
  646.  
  647.  
  648.  
  649.         /*************************************************************
  650.          * Code Generation
  651.          *************************************************************/
  652.  
  653.         //
  654.         // ObjectPrefix
  655.         //
  656.         //    Get the prefix used when accessing member functions of the
  657.         //    object -- eg. "cb_1->"
  658.  
  659.         VEXPORT WString GetObjectPrefix() const = 0;
  660.  
  661.         //
  662.         // GenName
  663.         //    Generate a variable name by number, eg. cb_1 if id == 1
  664.         //    The string is an out parameter.
  665.  
  666.         VEXPORT void GenName( WUInt id, WString & ) const = 0;
  667.  
  668.         //
  669.         // GenClassName
  670.         //
  671.         //    Generate the name of the C++ or Java class that implements
  672.         //    this object.
  673.  
  674.         VEXPORT void GenClassName( WString & ) const = 0;
  675.  
  676.         //
  677.         // GenResourceName
  678.         //
  679.         //    Generate the resource ID from the object name.  This is
  680.         //    usually of the form ID_name.
  681.  
  682.         VEXPORT void GenResourceName( WString & ) const = 0;
  683.  
  684.         //
  685.         // GenResourceStyles
  686.         //
  687.         //     Generate the .rc file styles that will be used; the first
  688.         //     parameter is a string list filled with styles, the second
  689.         //     is filled with extended styles
  690.  
  691.         VEXPORT void GenResourceStyles( WStringList &, WStringList & ) const = 0;
  692.  
  693.         //
  694.         // GenEventObjectName
  695.         //
  696.         //     Generate the object name for an event. The name is built
  697.         // by recursing the DTObject hierarchy and prepending the names
  698.         // of the DTObjects
  699.  
  700.         VEXPORT void GenEventObjectName( WString & ) const = 0;
  701.  
  702.         //
  703.         // FindStyle
  704.         //
  705.         //     Find a style of a given name within the object
  706.  
  707.         VEXPORT const MMStyle *     FindStyle( const char * ) const = 0;
  708.  
  709.         //
  710.         // FindProperty
  711.         //
  712.         //     Find a property of a given name within an object
  713.  
  714.         VEXPORT const MMProperty *  FindProperty( const char * ) const = 0;
  715.  
  716.  
  717.         /*************************************************************
  718.          * Implementation details
  719.          *************************************************************/
  720.     public:
  721.         VEXPORT DTObjectImp *   GetImplementation() = 0;
  722.  
  723.         VEXPORT void            EscapeCString( WString &, const WString & ) const = 0;
  724. };
  725.  
  726. #endif // _DTOBASE_HPP
  727.